<?php
/**
 * PsiFramework
 *
 * Php Simple Framework
 *
 * PHP version 5.3
 *
 * @category  PsiFramework.Plugins.Form.Classes.Util.Json.DAO
 * @package   PsiFramework.Plugins.Form.Classes.Util.Json.Elements
 * @author    Remi San <remi.san@gmail.com>
 * @copyright 2011 Remi San
 * @license   http://creativecommons.org/licenses/by/3.0/  Creative Commons CC BY 3.0
 * @version   SVN: <svn_id>
 * @link      http://www.psiframework.com/phpdoc/classes/db_\PsiFramework\Plugins\Form\Classes\Util\Json\Elements\JsonFormOption.html
 */

namespace PsiFramework\Plugins\Form\Classes\Util\Json\Elements;

/**
 * The json form input class
 *
 * This is the json form input model class
 *
 * @category PsiFramework.Plugins.Form.Classes.Util.Json.DAO
 * @package  PsiFramework.Plugins.Form.Classes.Util.Json.Elements
 * @author   Remi San <remi.san@gmail.com>
 * @license  http://creativecommons.org/licenses/by/3.0/  Creative Commons CC BY 3.0
 * @link     http://www.psiframework.com/phpdoc/classes/db_\PsiFramework\Plugins\Form\Classes\Util\Json\Elements\JsonFormOption.html
 */
class JsonFormOption
{
    /**
     * @var string
     */
    protected /*string*/  $_value ;
    /**
     * @var bool
     */
    protected /*bool*/    $_selected ;

    /**
     * Constructor
     * 
     * @param string $value    the value
     * @param bool   $selected is the option selected
     * 
     * @return JsonFormOption
     */
    public function __construct(
        /*string*/ $value=null,
        /*bool*/   $selected=false
    )
    {
        $this->_value = $value ;
        $this->_selected = $selected ;
    }

    /**
     * Getter for the level
     *
     * @return string
     */
    public function getValue()
    {
        return $this->_value ;
    }

    /**
     * Setter for the value
     *
     * @param string $value The value
     *
     * @return void
     */
    public function setValue($value)
    {
        $this->_value = $value ;
    }

    /**
     * Getter for the selected variable
     *
     * @return bool
     */
    public function isSelected()
    {
        return $this->_selected ;
    }

    /**
     * Setter for the selected variable
     *
     * @param bool $selected The selected variable
     *
     * @return void
     */
    public function setSelected($selected)
    {
        $this->_selected = $selected ;
    }
}
